You are here

howto

How to Boot into Single User Mode in CentOS/RHEL 7

DISCLAIMER: this is not my post is only a copy, in case the original get deleted or whatever, posting on my personal blog get easier for me to find it. You can find the original one in this link https://vpsie.com/knowledge-base/boot-single-user-mode-centos-rhel-vpsie/

The first thing to do is to open Terminal and log in to you CentOS 7 server.

After, restart your server wait for GRUB boot menu to show.

Next step is to select your Kernel version and press

Tags: 

Free EL YUM Repositories

If you are using some flavor of an Enterprise Linux, eventually will get tired of download rpm packages from Here BTW, is a really great page when you don't have access to FTP services (damn telecom/security guys).

And eventually, you will need to have repositories on your server to solve the dependencies.
Here are some free repository provided by Oracle for FREE, but of course, with NO SUPPORT.

SSH login without password

Supose you want to use Linux and OpenSSH to automize your tasks or you just don't want to type the password everytime you connect to a server.
You can solve this issue by doing this.

Scenario:
skyline wants to connect to veyron using ssh without password.

By default the ssh command has an order to check for autentications: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

Tags: 

Easy password generator command.

As a sysadmin, I need to generate lots of passwords and sometimes if you do so without an script the generated password becomes really easy to guess and also is hard to build a safe password.

Because of this I use this script to generate pseudo randomly passwords, is not an un-crackable method but solves the main problem.
You can put this code at the end of your .bashrc file, in order to make it like a system command, please do not remove the other lines in the file.

Tags: 

Recursively delete .svn directories

Subversion is a software versioning and revision control system.
Every copy of source code received from subversion repository has .svn folders, which store metadata.

This is a simple example of a unix command, which recursively deletes subversion .svn folders, these folders are often not necessary, if you want to distribute the source code.
You can put this code at the end of your .bashrc file, in order to make it like a system command, please do not remove the other lines in the file.

Tags: 

Hiding .svn directories from web queries.

web-server / # cat /etc/apache2/vhosts.d/00_default_vhost.conf

...

<VirtualHost *:80>
...


        ###### You can...
	##
	# 	Deny access to .svn folders on Apache...
	#
	RedirectMatch 404 /\\.svn(/.*|$)

        ###### or ...
	##
	# 	Restrict access to .svn folders on Apache... 
	#
	<DirectoryMatch .*\.svn/.*>
		Order allow,deny
    		Deny From All
	</DirectoryMatch>

...

</VirtualHost>
...

Timezone configuration, MX guide.

This guide is to learn how to set correctly the timezone in a Gentoo Linux and Mexico/General timezone.

First copy or link the proper zone to localtime:

pluton ~ # ln -sf /usr/share/zoneinfo/Mexico/General /etc/localtime
pluton ~ # ls -l /etc/localtime
lrwxrwxrwx 1 root root 23 Jun  6 18:13 /etc/localtime -> /usr/share/zoneinfo/GMT

Now specify your timezone:

Install IcePHP using Ice-3.4.1

First you need to install the Ice libs.

zeus ~ # emerge Ice -av
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-libs/Ice-3.4.1  USE="ncurses python -debug -doc -examples -mono -ruby -test" RUBY_TARGETS="ruby18" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] 

And then copy the compressed file in a safe and different place, then go there and expand the file.

Setup MX records with tinydns or djbdns and gmail

Just modify the data file to look like this one.

evo ~ # vi /bla/bla/bla/tinydns-IPX/root/data
...
...
...
# myowndomain.com's MX Servers
@myowndomain.com::aspmx.l.google.com.:10:86400
@myowndomain.com::alt1.aspmx.l.google.com.:20:86400
@myowndomain.com::alt2.aspmx.l.google.com.:20:86400
@myowndomain.com::aspmx2.googlemail.com.:30:86400
@myowndomain.com::aspmx3.googlemail.com.:30:86400
@myowndomain.com::aspmx4.googlemail.com.:30:86400
@myowndomain.com::aspmx5.googlemail.com.:30:86400
...
...
...

Install grub in a HP Proliant Server

Edit the file /boot/grub/device.map to look like this

(fd0) /dev/fd0
(hd0) /dev/cciss/c0d0
.....

Run grub like this:

hercules ~ # /sbin/grub --batch --device-map=/boot/grub/device.map --config-file=/boot/grub/grub.conf --no-floppy

grub shell:

grub> root (hd0,0)
grub> setup (hd0)
grub> quit
Subscribe to RSS - howto