/etc/rc.d/init.dand SuSE uses
yum install gcc gcc-c++
root. The only steps that need
rootaccess are the actual installation steps, but by doing the
root, the source code will also be inaccessible to “regular” users.
telnet!! Whenever you use
telnet(or plain FTP for that matter), you are transmitting your username, password, and all session information in “plain text”. This means that anyone who can access a machine someplace between your PC and your server can snoop your session and get your info. Use encryption wherever possible!
grepto filter your results:
rpm -qa | grep -i httpd
rpm -qa | grep -i php
rpm -qa | grep -i mysql
tarcommand is usually associated with making tape backups –
tarstands for Tape ARchive. It’s also a handy way to pack up multiple files for easy distribution. Use the
man tarcommand to learn more about how to use this very flexible tool.
Apache – 1.3.37
PHP – 4.4.6
tar zxf apache_1.3.37.tar.gz
tar zxf mysql-4.1.22.tar.gz
rooton the system. To be able to easily identify MySQL processes in
pslist, we’ll make a user and group named
useradd -g mysql -c “MySQL Server” mysql
useraddcommand is doing is creating a user
mysqlin the group
mysqlwith the “name” of MySQL Server. This way when it’s showed in various user and process watching apps, you’ll be able to tell what it is right away.
safe_mysqldscript). Then child processes, owned by
mysqlare spawned from it. The parent controlling process watches the child processes and restarts them automatically if they get killed off, etc.
configurecommand has many options you can specify. I have listed some fairly common ones; if you’d like to see others, do:
root) can do anything with them.
chown -R mysql:mysql /usr/local/mysql/data
chown root:sys /etc/my.cnf
chmod 644 /etc/my.cnf
datadirectory not existing, etc., something went wrong in the
mysql_install_dbstep above. Go back and review that; make sure you didn’t get some sort of error message when you ran it, etc.
chmod +x /etc/rc.d/init.d/mysql
/sbin/chkconfig –level 3 mysql on
for file in *; do ln -s /usr/local/mysql/bin/$file /usr/bin/$file; done
/etc/my.cnfand uncomment the
rootuser (note that the MySQL
rootuser is not the same as the system
rootuser, and definitely should not have the same password as the system
rootuser password when prompted. You will then see the MySQL prompt:
testand all default accounts except for the MySQL root user. Enter each of these lines at the
delete from db;
delete from user where not (host=”localhost” and user=”root”);
rootto something harder to guess. This will make it that much harder for someone who gains shell access to your server to take control of MySQL.
YOU SEE “root” IN OTHER DIRECTIONS, WEBSITES, ETC.
EXIST IN YOUR MYSQL CONFIGURATION!
/etc. I set up a symbolic link like this:
/etc/php.iniin my editor to make changes.
/etc, so I set up a symbolic link from the actual location to
/etc/httpd.confin your favorite text editor, and set all the basic Apache options in accordance with the official Apache instructions (beyond the scope of this HOWTO).
#at the beginning of the lines which read:
#AddType application/x-httpd-php-source .phps
#of course) after the line
.php, add them to the
AddType application/x-httpd-php-source .phps .phtmls
index.phpto the list of valid Directory Index files so that your “default page” in a directory can be named
DirectoryIndex index.php index.htm index.html
foobar.bazto be a valid directory index page, just add the
.bazfiletype to the
AddTypeline, and add
/etc/rc.d/init.dso it can be auto-started and controlled like other system daemons. Set up a symbolic link for the
apachectlutility (installed automatically as part of Apache):