#su - root
#輸入密碼以root身分登入,使用終端機
#進入yast2 啟動xinetd服務
#yast2 -i mysql mysql-client
#chkconfig mysql --list
#/etc/init.d/mysql start
#mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MySQL to secure it, we’ll need the currentpassword for the root user. If you’ve just installed MySQL, andyou haven’t set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none): <- ENTER
OK, successfully used password, moving on…Setting the root password ensures that nobody can log into the MySQLroot user without the proper authorisation.
Set root password? [Y/n] <- Y
New password: <- 輸入MySQL root password
Re-enter new password: <- 再確認root password
Password updated successfully!
Reloading privilege tables..
…Success!
By default, a MySQL installation has an anonymous user, allowing anyoneto log into MySQL without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] <- Y
…Success!
Normally, root should only be allowed to connect from ‘localhost’. Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] <- Y
…Success!
By default, MySQL comes with a database named ‘test’ that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.
Remove test database and access to it? [Y/n] <- Y
- Dropping test database…… Success!- Removing privileges on test database…
… Success!
Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] <- Y
… Success!
Cleaning up…All done! If you’ve completed all of the above steps, your MySQLinstallation should now be secure.Thanks for using MySQL!
#yast2 -i apache2
#chkconfig apache2 --list
#/etc/init.d/apache2 start
#若無法順利啟動,按電腦的install/remove software修正apache2
#yast2 -i apache2-mod_php5
#/etc/init.d/apache2 restart
#vi /srv/www/htdocs/info.php
<?php
phpinfo();
?>
#yast2 -i php5-mysql php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm
#/etc/init.d/apache2 restart
#cd /srv/www/htdocs
#wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.8.2/phpMyAdmin-3.5.8.2-all-languages.tar.gz/download#!md5!040ef1264a9b0b07dcaa2bb0cce7aa72
#tar zxvf phpMyAdmin-3.5.8.2-all-languages.tar.gz -C /srv/www/htdocs/
#mv phpMyAdmin-3.5.8.2-all-languages phpmyadmin
#若出現
#/etc/init.d/mysql restart
#測試用root登入