AlmaLinux-9.6-x86_64-dvd.iso
Oracle VirtualBox マネージャ(Ver.7.1.12) で 新規作成。
当説明ではIPアドレスを 192.168.56.104 を使用していますが、環境に合わせて読みかえてください。
・Install AlmaLinux 9.6
・Language: English (United States)
・DATE & TIME: Asia Tokyo
・KEYBOARD: Japanese
・SOFTWARE SELECTION: Server
Console Internet Tools
Development Tools
・KDUMP: disabled
・NETWORK & HOST NAME
Ethernet(enp0s3)
[configure...]
IPv6 Settings
Method Disabled
[save]
Ethernet(enp0s8)
[configure...]
IPv4 Settings
Method Manual
Address Add
Address Netmask
192.168.56.104 24
IPv6 Settings
Method Disabled
[save]
Host Name: a96.localnet [Apply]
・ROOT PASSWORD
・USER CREATION (例: Name=Development User, Login-ID=devusr)
・[Begin Installation]
処理終了を待つ
・[Reboot System]
''' rootログイン。
# ip a
''' enp0s8のIPアドレスを確認。(例: IP-Address=192.168.56.104)
# exit
''' CygwinやWindowsターミナルエミュレータからdevusrでログイン。
ssh devusr@192.168.56.104
''' Disable SELINUX
$ su -
# cd /etc/selinux
# vi config
# grep '^SELINUX=' config
SELINUX=disabled
#
''' Make a work directory and restart.
# cd
# mkdir files
# shutdown -r now
''' CygwinやWindowsターミナルエミュレータからdevusrでログイン。
$ su -
# dnf -y upgrade
''' 基本ソフトウェアのインストール
# dnf -y install epel-release
# dnf -y install lynx ImageMagick ImageMagick-devel nkf emacs
''' mariadbのインストール
# dnf -y install mariadb mariadb-server
# systemctl start mariadb.service; \
systemctl enable mariadb.service
# mysql -u root -p
パスワード入力はCR(Enter)だけ。
> set password for 'root'@'localhost' = password('pass1234');
> create database devdb character set utf8mb4;
> create user 'devusr'@'localhost' identified by 'pass1234';
> grant all privileges on devdb.* to 'devusr'@'localhost';
> create user 'root'@'192.168.56.%' identified by 'pass1234';
> grant all privileges on *.* to 'root'@'192.168.56.%';
> SELECT User,Host FROM mysql.user;
> exit
# firewall-cmd --zone=public --add-port=3306/tcp --permanent
# firewall-cmd --reload
# firewall-cmd --list-ports
''' MySQLのタイムゾーンの設定
# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p
#
''' PHP8.3
# dnf -y module reset php
# dnf -y module enable php:8.3
# dnf -y install \
php php-cli php-common php-fpm \
php-bcmath php-gd php-gmp php-intl php-json php-ldap \
php-mbstring php-mysqlnd php-odbc php-opcache php-pdo \
php-pgsql php-process php-snmp php-soap php-xml \
libzip
#
''' HTTPD
# dnf -y install httpd httpd-devel httpd-tools mod_ssl
# systemctl enable httpd; \
systemctl start httpd
# firewall-cmd --permanent --add-service=http
# firewall-cmd --permanent --add-service=https
# firewall-cmd --reload
# cd /etc
# cp php.ini ~/files/php.ini
# vi php.ini
# diff ~/files/php.ini php.ini
605c605
< ;error_log = php_errors.log
---
> error_log = /var/log/php_error.log
942c942
< ;date.timezone =
---
> date.timezone = Asia/Tokyo
1034c1034
< pdo_mysql.default_socket=
---
> pdo_mysql.default_socket=/var/lib/mysql/mysql.sock
#
# touch /var/log/php_error.log; \
chown apache:apache /var/log/php_error.log; \
chmod 666 /var/log/php_error.log
# systemctl restart httpd
# vi /var/www/html/index.php
# cat /var/www/html/index.php
<?php
phpinfo();
#
# shutdown -r now
リブート後にクライアントのWEBブラウザからWEBページ(http://192.168.56.104)を確認。
$ cd
$ vi .bash_profile
$ grep -n 'alias' .bash_profile
3:# Get the aliases and functions
9:alias delb='rm -f *~ .??*~'
10:alias e='emacs'
11:alias ll='ls -al'
$
$ cd
$ vi .emacs
$ cat .emacs
(setq-default tab-width 4 indent-tabs-mode nil)
(add-hook 'php-mode-hook
(lambda ()
(setq tab-width 4)
(setq c-basic-offset 4)))
$