WordPress – Changing Permalinks

Hi,

in the net you find tons of posts what changes you have to made if you wanna change your permalinks to postname. But mostly in combination with an apache webserver.

So im using nginx and this is a bit more difficult.

But i found the solution.

Simply add this line to your vhost configuration:


if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}

For apache just place an empty .htaccess file in your wordpress-folder, give it 666 permissions and insert this:


# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Spacewalk – Automatic Creation of a Kickstartable Tree

Spacewalk is a tool for (mainly) managing and provisioning server or client linux-systems.

I’m using for a few months now and yeah. Its not well documented, especially the provisioning part.

Spacewalk uses kickstart as provisioning tool.

You have to add a kickstartable tree. Then make your kickstart distribution and then finally your kickstart profile where you define the properties for your system.

The problem is the kickstartable tree. The documentation says, simple mount a distribution dvd and then use the path where the distro is mounted.

Uhm… no. wont work for CentOS 🙂

I found a script on the net wich dowloads all the distribution files that you need. its name is mkelfs.

The github entry was updated in Nov 2015 but it still works.

Just download it from here: https://github.com/stdevel/mkelfs/blob/master/mkelfs.py

Before you can use the command you have to create the folders in which the script deploys the distro data.

mkdir /var/satellite/kickstart_tree

Here is the command you need for CentOS 7 (dont be suprised, the reason why Centos is not in the parameters is that its a default value 😀 )

./mkelfs.py --release 7 --arch x86_64 -b centos7-x86_64

-b is the name of your base channel

CentOS 7 – Firewalld allow all traffic from a Server

I hate the default firewall in CentOS. 😀

Its so unneeded complicated that a simple Access-Rule seems to be as hard as climbing up the mount everest.

So, my problem was i wanted to configure a CentOS-Server for our backup system. Backup client was installed but the CentOS-Firwall was blocking the traffic.

Our backup-system needs several ports (in range) and communication comes from multiple servers.

But i didnt wanted to allow a port range because of security. So open up traffic for our backup-subnet was the way to go.

Here is the command:

firewall-cmd --permanent --zone=public --direct --add-rule ipv4 filter IN_public_allow 0 -s xx.x.xx.x/xx -j ACCEPT

firewall-cmd --reload

Have fun 😀

Dell MD3220 – reset preferred controller module

Recently, id resetted the controller modules of the Dell MD3220 Storage Array while troubleshooting some strange events (it didnt change anything, ok its not a windows system ;D ).

After this, the virtual disks changed their path to the second controller. Ok, its not “mission critical”, but you always get the message that the virtual disks are not one the preferred path.

So, as described in my last post, this is also one of the operations that cant be made with MD Storage Manager.

This command will help: smcli.exe your-md-dns-name-or-ip -c "reset storageArray virtualDiskDistribution;"

Ps: Here you can find the Command Line Guide for SMCLI:

http://ftp.respmech.com/pub/MD3000/CLIA20EN.pdf

Dell MD3220 – how to reset unreadable Sectors statistic

Hy,

recently, i had the problem that our Dell MD3220 Storage Array was showing Alerts regarding unreadable sectors on disk drives.
Stupidly it didnt say which disk is affected. I thought that this is a old message, which is not cleared.

So my first step was resetting the statistic. If there are really defective sectors, the message will show up again.

The trick is, you cant do this over the gui (Dell MD Storage Manager) – you have to use SMCLI (which is part of the installation of the storage manager).

Here is the command:

scmli.exe your-md-dns-name-or-ip -c "clear allVirtualDisks unreadableSectors;"

The message is gone in my case.

Ps: Here you can find the Command Line Guide for SMCLI:

http://ftp.respmech.com/pub/MD3000/CLIA20EN.pdf