Install Cherokee with PHP5 and MySQL supported in Fedora 14

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:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 1

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/:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 2

The main interface of the control panel is as follows:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 3

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 :

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 4

In the left-hand window, you will see all the current rules of the system:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 5

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 :

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 6

Next, click Create in the Configuration Assistant window :

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 7

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:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 8

To complete this process, click on the box labeled NON FINAL:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 9

The system will change to FINAL :

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 10


In the upper right corner of the screen, you click the Save button to save the change:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 11

And click Graceful restart at the next window:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 12

Now, PHP will be listed on Behavior tab (check in the Final column):

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 13

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 ):

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 14

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:

Install Cherokee with PHP5 and MySQL supported in Fedora 14 Picture 15

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.

4 ★ | 2 Vote

May be interested

  • Access applications directly to XAMPP MySQL ServerAccess applications directly to XAMPP MySQL Server
    in this article, we use the linux operating system ojuba 2 - 1 based on fedora 10 framework framework, the account used here is root
  • How to Install the MySQL Database Server on Your Windows PCHow to Install the MySQL Database Server on Your Windows PC
    this wikihow teaches you how to install the mysql server program on a windows 10 computer. in order to install mysql on a windows computer, you must first have python 2.7 (not python 3+) installed. open the python download page. go to...
  • How to install Apache, MySQL and PHP in OS XHow to install Apache, MySQL and PHP in OS X
    using mamp, you can quickly and easily install apache, php and mysql on your mac.
  • Virtualize user and domain accountsVirtualize user and domain accounts
    in the following article, tipsmake.com will guide, explain to you how to install postfix-based mail server system - built on virtual user and domain accounts
  • How to Send Sql Queries to Mysql from the Command LineHow to Send Sql Queries to Mysql from the Command Line
    a simple text-based program called mysql should have been part of your mysql installation. it lets you send sql queries directly to the mysql server and output the results in text format. it is a quick and easy way to test your mysql...
  • Fedora 18 operating system has completed the BetaFedora 18 operating system has completed the Beta
    after a few delays, the beta version of the linux-based fedora 18 was released.
  • How to Connect to MySQL Using PHPHow to Connect to MySQL Using PHP
    if you already know some of the basics of writing php scripts, you may be ready to learn about a set of built-in php functions that allow you to connect to and manipulate a mysql database. if you do not already have a mysql server (most...
  • Guide to creating Virtual Hosting with PureFTPd and MySQLGuide to creating Virtual Hosting with PureFTPd and MySQL
    in the following article, tipsmake.com will show you how to install the pureftpd server using virtual user accounts from mysql's database, all inside the real system.
  • How to create a database in MySQLHow to create a database in MySQL
    mysql can be a scary program. all commands must go through the command line interpreter program (command prompt) without any intuitive interface. therefore, the basic knowledge of how to create and manipulate on a database in mysql can save you time and avoid nuisance.
  • How to Check Database Size in MySQLHow to Check Database Size in MySQL
    this wikihow teaches you how to check the size of a mysql database. you can check the size of a database using mysql workbench, or by running a query in mysql. open mysql workbench. it has a blue icon that with an image that resembles a...