Configure CentOS Firewall From Command Line
Run Lokkit Program to Configure Firewall
lokkit
Add port 902 to communicate with VMWare service
Software For Every Situation.
Archive for the ‘Operating System’ Category.
Run Lokkit Program to Configure Firewall
lokkit
Add port 902 to communicate with VMWare service
Install Package By Calling YUM With Install
yum install gcc
Install Ruby
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.1/packages/i386/ruby-1.8.5p6.tgz
Install Gems
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.1/packages/i386/ruby-gems-0.9.0.tgz
Install Rails And FCGI
gem install rails
gem install fcgi
Install Package
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.1/packages/i386/mysql-server-5.0.33.tgz
Install Default Database
/usr/local/bin/mysql_install_db
Start Service And Set Root Password
/usr/local/bin/mysqld_safe &
/usr/local/bin/mysqladmin -u root password ‘<password>’
Start Daemon on Server Startup, Add to /etc/rc.local
if [ -x /usr/local/bin/mysqld_safe ]; then
echo ‘MySQL’
/usr/local/bin/mysqld_safe &
fi
Install Packages
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.1/packages/i386/fcgi-2.4.0p2.tgz
pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/4.1/packages/i386/lighttpd-1.4.13p2-mysql.tgz
Example /etc/lighttpd.conf For PHP
$HTTP["host"] == “www.<example>.com” {
server.document-root = “/www/sites/<example>.com/www/”
index-file.names = ( “index.php” )
server.error-handler-404 = “/index.php”
fastcgi.server = ( “.php” =>
( “localhost” =>
(
”socket” => “/tmp/php-fastcgi.socket”,
”bin-path” => “/usr/local/bin/php-fcgi”
)
)
)
}
Example /etc/lighttpd.conf For Ruby on Rails
$HTTP["host"] == “www.<example>.com” {
server.indexfiles = ( “index.html” )
server.error-handler-404 = “/dispatch.fcgi”
server.document-root = “/Rails/public”
fastcgi.server = (”.fcgi” => ( “<example>” =>
( “min-procs” => 1,
”max-procs” => 5,
”socket” => “/tmp/rails-<example>.fastcgi”,
”bin-path” => “/Rails/public/dispatch.fcgi”,
”bin-environment” => ( “RAILS_ENV” => “production” )
)
))
}
Start Daemon on Server Startup, Add to rc.local
if [ -x /usr/local/sbin/lighttpd ] ; then
echo ‘Lighttp’
/usr/local/sbin/lighttpd -f /etc/lighttpd.conf
fi
Secure Copy
scp <source file> <remote user>@<remote server>:<target file>
TAR And GZIP a Directory Into Single File
tar -czf /<output file name>.tar.gz /<input directory>
Extract Contents Of a TAR.GZ File
tar -xzf /<input file name>.tar.gz
Check Disk Usage
df
Install Ports
http://www.tucsonconsulting.com/software/operating-system/unix/openbsd/40/how-to-install-openbsd-40-ports/
Install MySQL
http://www.tucsonconsulting.com/software/service/database/mysql/install-mysql-50-on-openbsd-40/
Install Lighttp
http://www.tucsonconsulting.com/software/language/ruby/install-lighttp-w-fastcgi-14-on-openbsd-40/
Install PHP With FastCGI
http://www.tucsonconsulting.com/software/operating-system/unix/openbsd/40/install-php-51-w-fastcgi-on-openbsd-40/
Download And Extract Wordpress
mkdir /www
mkdir /www/sites
mkdir /www/sites/<example>.com
mkdir /www/sites/<example>.com/www
lynx -source “http://wordpress.org/latest.tar.gz” > /www/sites/<example>.com/www/wordpress.tar.gz
cd /www/sites/<example>.com/www/
tar zxvf wordpress.tar.gz
Configure MySQL Database For Wordpress
mysql -p
create database `www-<example>-com`;
grant all on `www-<example>-com`.* to ‘wordpress’@'localhost’ identified by <password>’;
flush privileges;
exit
Configure /etc/lighttpd.conf For New Site
http://www.tucsonconsulting.com/software/language/ruby/install-lighttp-w-fastcgi-14-on-openbsd-40/
Mount The CD-ROM
mount /dev/cdrom
Issue The Disk Dump Command
dd if=/dev/cdrom of=/software/<filename>.iso
Stop VM Servers
/etc/init.d/vmware stop
Install VMWare Package
rpm -Uhv /tmp/VMware-server-<version>.i386.rpm
Run Installation Script
vmware-config.pl
Run YUM update, answer yes to all prompts
yum update -y