Install Cherokee with PHP5 and MySQL supported in Fedora 14
Currently, Cherokee is one of the lightest Web Server, high flexibility and easy to configure and set up. In addition, it also supports many advanced technology platforms such as FastCGI, SCGI, PHP, CGI, encryption connecting TLS and SSL protocols, virtual hosts, encryption mechanisms, load balancing of resources, data data of the system, Apache log file ...
QuanTriMang - Currently, Cherokee is one of the lightest Web Server, high flexibility and easy to configure and set up. In addition, it also supports many advanced technology platforms such as FastCGI, SCGI, PHP, CGI, encryption connecting TLS and SSL protocols, virtual hosts, encryption mechanisms, load balancing of resources, data Data of the system, Apache log file . In the following article, we will present the basic steps to install Cherokee on Fedora 14 server operating system with PHP5 support (via FastCGI) and MySQL.
In this test we use hostname server1.example.com with IP address 192.168.0.100. Depending on different systems, you need to adjust these parameters accordingly.
Installing MySQL 5:
First, use the following command to install MySQL 5:
yum install mysql mysql-server
Create boot path for MySQL (through which MySQL automatically activates the same system) and start MySQL server:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
Then use the command:
mysql_secure_installation
To initiate a password for the root account (otherwise, anyone can access the MySQL database):
[root @ server1 ~] # mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE!PLEASE READ EACH STEP CAREFULLY!
In hàng lệnh để đăng nhập vào MySQL để bảo vệ nó, sẽ cần phải hiện thời
password for the root user. If you've just installed MySQL, và
bạn không đặt được mật khẩu root này, mật khẩu sẽ được trống,
so you should just press enter here.
Enter current password cho root (nhập cho không): OK, đã successfully dùng mật khẩu, chuyển đổi khi .
Thiết lập mật khẩu gốc cần thiết mà không thể đăng nhập vào MySQL
root user without the proper authoring.
Set root password?[Y / n] New password: Re-enter new password: Password updated successfully!
Reloading privilege tables .
. Success!
Vì mặc định, một cài đặt MySQL có một người dùng không rõ, Allow anyone
để đăng nhập vào MySQL không có thể có một người dùng đăng nhập cho cho
more. Đây được sử dụng chỉ để kiểm tra, và để tạo cài đặt
go a bit smoother. Bạn nên gỡ bỏ chúng trước khi chuyển vào
production environment.
Remove anonymous users?[Y / n] . Success!
Thường, root nên chỉ được phép phép kết nối từ 'localhost'.This
ensures that someone cannot guess at the root password from the network.
Disallow root login command?[Y / n] . Success!
By default, MySQL comes with a database được xác định 'thử' mà có thể
access. Đây là chỉ định chỉ chỉ cho thử thử, và nên được gỡ bỏ
trước khi chuyển vào một Production environment.
Remove test database and access to it?[Y / n] - Dropping test database .
. Success!
- Removing privileges on test database .
. Success!
Reloading the privilege tables will ensure that all changes do so far
sẽ xử lý ngay ngay.
Reload privilege tables now?[Y / n] . Success!
Cleaning up .
All done!If you've completed all steps theo đây, bạn MySQL
cài đặt nên được bảo vệ.
Thanks for dùng MySQL!
[root @ server1 ~] #
Install Cherokee:
Currently, Cherokee is available in the Fedora installation packages, so just use the command:
yum install cherokee
Create a boot path for Cherokee, and activate this service as well:
chkconfig --levels 235 cherokee on
/etc/init.d/cherokee start
Then, open the browser and type in the address http://192.168.0.100, you will see the startup page as shown below:
Cherokee's control mechanism is done via the browser, we can start as follows:
cherokee-admin -b
By default, cherokee-admin is assigned with 127.0.0.1 (localhost), which means that you can only connect from one system. With the -b parameter, you can explicitly specify the address of the specific network system to connect to. The results returned from the system will look like this:
[root @ server1 ~] # cherokee-admin -b
Login:
User: admin
One-time Password: gunCkIxdT8nQ6JqW
Web Interface:
URL: http:/// localhost: 9090 /
[11/10/2010 14: 50: 26,964] (error) rrd_tools.c: 120 - Could not find the rrdtool binary.
Cherokee Web Server 1.0.4 (June 28, 2010): Listening on port ALL: 9090, TLS
disabled, IPv6 enabled, using epoll, 4096 fds system limit, max. 2041
connections, caching I / O, single thread
You need to log in with the account at the following address http://192.168.0.100:9090/:
The main interface of the control panel is as follows:
If you want to deactivate cherokee-admin , press Ctrl + C.
Installing PHP5:
We can do PHP5 works in Cherokee via FastCGI, so need to install additional php-cli support package:
yum install php-cli
PHP5 configuration:
First, we need to edit the /etc/php.ini file and uncomment the cgi.fix_pathinfo = 1 line as follows:
vi /etc/php.ini
[.]
; cgi.fix_pathinfo provides * real * PATH_INFO / PATH_TRANSLATED support for CGI. PHP's
; trước behavior cho đặt PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
; này để 1 sẽ tạo PHP CGI để sửa đổi các đường dẫn của nó để áp dụng đến SPEC. A setting
; của không tạo PHP để behave như trước. Default là 1. Bạn cần phải sửa bạn script
; để sử dụng SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://www.php.net/manual/en/ini.core.php#ini.cgi.fix-pathinfo
cgi.fix_pathinfo = 1
[.]
Then restart Cherokee:
/etc/init.d/cherokee restart
Activate PHP5 in Cherokee:
By default, PHP is not enabled in Cherokee. To fix this, we need to access Cherokee's main control mechanism:
cherokee-admin -b
Login via http://192.168.0.100:9090/ as above. Then, select vServers , select vhost default and go to Behavior tab, click Rule Management button :
In the left-hand window, you will see all the current rules of the system:
Click on the plus icon next to Behavior to add a new rule, a new popup window will appear, select the Languages in the left column, choose PHP and click Add :
Next, click Create in the Configuration Assistant window :
Here, you will see the new rule for PHP in the left column, with NON FINAL status. Users can change the default PHP settings if desired, besides the FastCGI configuration item located in the Handler tab:
To complete this process, click on the box labeled NON FINAL:
The system will change to FINAL :
In the upper right corner of the screen, you click the Save button to save the change:
And click Graceful restart at the next window:
Now, PHP will be listed on Behavior tab (check in the Final column):
Then press CTRL + C on the command line to stop the control operations.
Check PHP 5:
The default root document folder of the website is stored at / var / www / cherokee. Next, we will create a small PHP file ( info.php ) right in that directory and call it in a browser. This file will display more detailed information about the PHP installation process:
vi /var/www/cherokee/info.php
And continue calling that file using the browser ( http://192.168.0.100/info.php ):
As you can see, PHP5 already works, and through FastCGI , is indicated at the Server API line. If you continue to scroll down to the bottom, you will see all the modules are enabled in PHP5, and MySQL is not listed here, meaning MySQL is not fully supported in PHP5.
To fix this problem, we can install the php-mysql support package by searching through the following PHP5 modules:
yum search php
Select one component and proceed with the installation:
yum install php-mysql php-gd php-ldap php-odbc php-pear php-php-xmlrpc xml
Then restart the entire Cherokee system:
/etc/init.d/cherokee restart
Reload the file http://192.168.0.100/info.php in the browser, and check the modules in the list:
When you have completed the above steps without many problems, it means that we have finished installing Cherokee web server system with PHP and MySQL on the Fedora 14 platform.
Some references: Cherokee, PHP, MySQL and Fedora.
You should read it
- Instructions for installing myBB Forum on the server
- Access applications directly to XAMPP MySQL Server
- iRedOS-0.6.0: Open source Mail Server system
- Guide to creating Virtual Hosting with PureFTPd and MySQL
- How to Send Sql Queries to Mysql from the Command Line
- Instructions for installing MySQL on Windows and remote access
- How to install and configure MySQL server on Pi
- How to install MySQL on Ubuntu 20.04
- How to upgrade to Fedora 32
- Fedora 32 officially launched with GNOME 3.36
- How to set up an internal RADIUS Server - Part 2
- Instructions on how to connect to MySQL Server in IntelliJ
Maybe you are interested
5 gym support tools at home: simple but surprisingly effective How to view saved Wifi passwords on Windows 7/8/10 Working with File in Python How to change the color of the message frame on iPhone / iPad How to transform the message interface on iPhone How to send music, MP3 songs through Messenger to listen