GNU/Linux >> Linux の 問題 >  >> Cent OS

CentOS7VPSにPHP-Fusion7をインストールします

PHP-Fusionは、軽量のPHPベースのオープンソースコンテンツ管理システム(CMS)です。 MySQLデータベースを利用してWebサイトのコンテンツを保存し、サイトを管理するための非常にシンプルな管理システムが含まれています。

このチュートリアルでは、Apache、MariaDB、およびPHPを使用してCentOS7VPSにPHP-Fusion7をインストールします。

PHP-Fusion 7はほとんどの構成で実行するように構築されていますが、それでもサーバーは次の要件を満たす必要があります。
PHPバージョン5.3.4以降
MySQLバージョン4.1以降

まず、CentOS 7 VPSにログインし、インストールされているすべてのパッケージが最新であることを確認します

yum -y update

PHP-Fusionを実行するにはLAMPスタックが必要なので、最初にApache Webサーバー、MariaDB、PHPをインストールします。

MariaDBはCentOS7のデフォルトのデータベースサーバーであり、yumコマンドを使用してインストールできます。

yum install mariadb mariadb-server

MariaDBサービスを開始し、起動時に開始できるようにします

systemctl start mariadb.service
systemctl enable mariadb.service

MariaDBがインストールされたら、データベースサーバーを保護し、ルートパスワードを設定するために、次のインストール後のスクリプトを実行します

mysql_secure_installation

次のオプションを使用します

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

新規、ApacheWebサーバーをインストールします

yum install httpd

Webサーバーを起動し、起動時に起動できるようにします

systemctl start httpd
systemctl enable httpd

PHP-FusionはPHPベースのアプリケーションであるため、PHPをインストールする必要があります
yum install php php-mysql

変更を有効にするためにApacheWebサーバーを再起動します

systemctl restart httpd

これで、CentOS 7サーバーに完全に機能するLAMPスタックがインストールされ、PHP-Fusionのインストールから開始できます。

PHP-Fusionの最新の安定バージョンをサーバーにダウンロードします

wget http://downloads.sourceforge.net/project/php-fusion/PHP-Fusion%20Archives/7.x/PHP-Fusion-7.02.07.zip

ダウンロードしたzipアーカイブを解凍します

yum install unzip
unzip PHP-Fusion-7.02.07.zip

サーバーのドキュメントルートディレクトリに、新しいPHP-FusionWebサイトのディレクトリを作成します

mkdir /var/www/html/mywebsite.com

PHP-Fusionファイルを解凍したディレクトリから新しく作成したmywebsite.comディレクトリにコピーします

cp -R PHP-Fusion-7.02.07/files/* /var/www/html/mywebsite.com/

PHP-Fusion構成ファイルの名前を変更します

cd /var/www/html/mywebsite.com

作成したディレクトリの名前を変更します

mv _config.php config.php

PHP-Fusionファイルの所有者を変更します

chown -R apache:apache /var/www/html/mywebsite.com/

次に、ユーザーrootとしてMariaDBサーバーにログインし、新しいデータベースとユーザーを作成します

mysql -u root -p

MariaDB [(none)]> CREATE DATABASE phpfusion;
MariaDB [(none)]> GRANT ALL ON phpfusion.* to phpfusionuser@localhost identified by 'YOURPASSWORD';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

「YOURPASSWORD」を実際の強力なパスワードに置き換えることを忘れないでください。

次に、「yourdomain.com」ドメイン名のApache仮想ホスティングディレクティブを設定します。

次のコンテンツを含む「/etc/httpd/conf.d/vhosts.conf」ファイルを作成します

vim /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

すべての仮想ホストを配置する「/etc/httpd/vhosts.d」ディレクトリを作成します。

mkdir /etc/httpd/vhosts.d

ドメインの仮想ホストを作成する

cd /etc/httpd/vhosts.d
vim yourdomain.com

次のコンテンツを追加します

<VirtualHost YOUR_SERVER_IP:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/yourdomain.com"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/yourdomain.com/">
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

それで全部です。コマンドラインからのインストールが完了しました。次に、お気に入りのWebブラウザをhttp://yourdomain.comに移動し、指示に従ってインストールを完了します。

もちろん、Linux VPSホスティングサービスのいずれかを使用している場合は、これを行う必要はありません。その場合は、専門のLinux管理者にPHP-Fusionのインストールを依頼するだけです。 24時間年中無休でご利用いただけます。リクエストはすぐに処理されます。

PS。 この投稿が気に入った場合は、左側のボタンを使用してソーシャルネットワーク上の友達と共有するか、下に返信を残してください。ありがとう。


Cent OS
  1. CentOS6VPSにGlassFishをインストールします

  2. CentOS6VPSにOctopressをインストールします

  3. CentOS7VPSにOdoo8をインストールします

  1. CentOS7VPSにMediaWikiをインストールします

  2. CentOS7VPSにReaderSelfRSSをインストールする方法

  3. CentOS7VPSにOrangeHRMをインストールする方法

  1. CentOS7VPSにProjectPierをインストールする方法

  2. CentOS7VPSにJettyをインストールします

  3. CentOS7VPSにHabariをインストールします