設定固定IP選1或2
1.sudo nano /etc/netplan/00-installer-config.yaml
設定固定IP
network:
version: 2
ethernets:
ens32:
dhcp4: false
addresses: [192.168.0.50/24]
routes:
- to: default
via: 192.168.0.1
nameservers:
addresses: [1.1.1.1,8.8.8.8]
重啟網路設定
sudo netplan apply
2.設定固定IP
sudo nano /etc/netplan/00-installer-config.yaml
例如:
# This is the network config written by 'subiquity'
network:
ethernets:
eth0:
dhcp4: no
addresses: [192.168.137.200/24]
optional: true
gateway4: 192.168.137.1
nameservers:
addresses:[1.1.1.1,8.8.8.8]
version: 2
重啟網路設定
sudo netplan apply
sudo apt update
sudo apt upgrade
更改系統的時區
看目前時區
timedatectl
修改時區
sudo timedatectl set-timezone Asia/Taipei
安裝NTP同步時間
sudo apt install -y ntp
sudo systemctl start ntp
sudo systemctl enable ntp
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
#sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
#sudo add-apt-repository "deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/11.1/ubuntu $(lsb_release -cs) main"
sudo apt update
sudo apt upgrade
sudo apt install apache2 mariadb-server php7.2 libapache2-mod-php7.2 php7.2-curl php7.2-mysql php7.2-curl php7.2-gd php7.2-intl php-pear php7.2-imap php-memcache php7.2-pspell php7.2-recode php7.2-tidy php7.2-xmlrpc php7.2-mbstring php7.2-gettext php7.2-gmp php7.2-json php7.2-xml git wget -y
sudo systemctl start apache2
sudo systemctl start mariadb
sudo systemctl enable apache2
sudo systemctl enable mariadb
sudo mysql_secure_installation
mysql -u root -p
create database phpipam;
GRANT ALL on phpipam.* to phpipam@localhost identified by '1qaz2wsx';
FLUSH PRIVILEGES;
EXIT;
sudo git clone --recursive https://github.com/phpipam/phpipam.git /var/www/phpipam
sudo cp /var/www/phpipam/config.dist.php /var/www/phpipam/config.php
sudo nano /var/www/phpipam/config.php
$db['host'] = "localhost";
$db['user'] = "phpipam";
$db['pass'] = "1qaz2wsx";
$db['name'] = "phpipam";
define('BASE', "/");
cd /var/www/phpipam
mysql -u root -p phpipam < db/SCHEMA.sql
sudo chown -R www-data:www-data /var/www/phpipam
sudo chmod -R 755 /var/www/phpipam
設定 Apache 站台,檔案為sudo nano /etc/apache2/sites-enabled/000-default.conf
設定 sites
DocumentRoot /var/www/phpipam
<Directory /var/www/phpipam>
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
sudo a2enmod rewrite
sudo systemctl restart apache2
更改系統的時區
看目前時區
timedatectl
修改時區
sudo timedatectl set-timezone Asia/Taipei
我修改了sudo nano /etc/php/7.2/apache2/conf.d/20-xdebug.ini,並附加了這一行:
date.timezone = Asia/Taipei
請使用瀏覽器連至 http://ip/ ,預設帳號為 Admin,預設密碼為 ipamadmin,即可登入。
卸载 PHP 版本
sudo apt-get remove php8.2
sudo apt-get remove php8.2-*
沒有留言:
張貼留言