Now I have a plan to learn more about linux (Fedora), such as setting up a web server, starting a FTP server, doing some development, etc.
I had setup a web server successfully recently. The methods are as follows (my system is Fedora 15, there are some differences in other systems):
Firstly, install Apache, MySQL and PHP, run follow commands:
$ suNow, you should have necessary packages installed. After installed, you must set a password for mysql root usr:
# yum install mysql-server httpd php
$ suTo run the apache and mysql services, enter the following in terminal. This should be done each time you want to use.
# systemctl start mysqld.service
# mysqladmin -u root password PASSOWRD_HERE
$ suThe web server directory is "/var/www/html/". If you want the services to start with your OS, run the follows:
# systemctl restart mysqld.service
# systemctl restart httpd.service
$ suAt last, you must check the firewall to confirm the port 80 is open.
# systemctl enable mysqld.service
# systemctl enable httpd.service
After all the above are done, open your browser and visit http://127.0.0.1, you can see a test page:
No comments:
Post a Comment