GNU/Linux >> Linux の 問題 >  >> Ubuntu

UbuntuとLinuxMintでtaskselを使用してLAMPをすばやくインストールする方法

Taskselは、特定のタスクに使用されるパッケージのグループをインストールするためのDebianベースのシステム用のコマンドラインユーティリティです。 Taskselは、「LAMPサーバー」、「DNSサーバー」、「メールサーバー」、「Tomcat Javaサーバー」など、サーバーをすばやく構成するための多数のグループパッケージを提供しています。この記事は、taskselをインストールしてから、taskselを使用してLAMPをすばやくインストールするのに役立ちます。 Debian、Ubuntu、LinuxMintオペレーティングシステム。

Taskselのインストール

taskselパッケージは、ほとんどのUbuntu、Debian、およびLinuxMintオペレーティングシステムのデフォルトリポジトリで利用できます。次のコマンドを使用してインストールします。

sudo apt-get install tasksel

Taskselを使用してLAMPをインストールする

システムにtaskselパッケージをインストールした後、Ubuntu、Debian、およびLinuxMintシステムにLAMPセットアップをインストールしましょう。 sudoアクセスのあるターミナルでtaskselコマンドを実行して、lamp-serverをインストールします。

sudo tasksel install lamp-server

セットアップは数分以内に完了します。 MySQLサーバーは、rootユーザー用に設定されたパスワードなしでインストールされます。パスワードなしでMySQLに簡単にアクセスできます。

次に、以下のコマンドを実行して、新しいパスワードを設定し、コマンドラインウィザードを使用してMySQLのインストールを保護します。

sudo mysql_secure_installation
手順に従ってください
Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: y

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
Please set the password for root here.

New password: **********
Re-enter new password: **********

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

LAMPスタックのテスト

おめでとうございます。LAMPのセットアップが完了しました。確認するには、Webブラウザーを開き、ローカルホストにアクセスします。以下のような画面が表示されます。 Apacheが正常に機能していることを示しています。

次に、WebサーバーのドキュメントルートにPHPスクリプトを作成します。例:/var/www/html/info.php phpinfo()関数を追加して、PHPの詳細を表示します。

PHP
123 <?php phpinfo();?>

次に、ブラウザでこのファイルにアクセスすると、次のような画面が表示されます。

この記事はUbuntu18.04LTSオペレーティングシステムでテストされています。


Ubuntu
  1. Ubuntu 16.04、14.04およびLinuxMint18にFilezillaをインストールする方法

  2. Ubuntu、Debian、LinuxMintにPython3.7をインストールする方法

  3. PPAを使用してUbuntu、Debian、LinuxMintにFirefoxDeveloperEditionをインストールする方法

  1. Ubuntu18.04または20.04にPHP7.4および8.0をインストールする方法

  2. Ubuntu18.04および20.04にAnacondaをインストールする方法

  3. Ubuntu20.04にMySQLをインストールする方法

  1. LAMPスタックを使用してUbuntu18.04にWordPressをインストールする方法

  2. Ubuntu18.04にMavenをインストールする方法

  3. Ubuntu14.04LAMPにWordpress4をインストールする方法