我查看/尝试了来自多个网站(包括 suiteCRM 网站)的多个脚本。在我看来,安装脚本页面是not found
(404 错误)。我正在学习 Linux。我是否明显做错了什么或遗漏了什么?
这是我的完整命令。
#1: setup apache#############################################
sudo apt install apache2 apache2-utils
sudo systemctl enable apache2
sudo systemctl start apache2
sudo systemctl status apache2
apache2 -v
sudo nano /etc/apache2/sites-available/www.suitecrm2.com.conf
<VirtualHost *:80>
ServerName suitecrm2.com
ServerAlias www.suitecrm2.com
ServerAdmin [email protected]
DocumentRoot /var/www/suitecrm/public
ErrorLog ${APACHE_LOG_DIR}/www.suitecrm2.com_error.log
CustomLog ${APACHE_LOG_DIR}/www.suitecrm2.com_access.log combined
<Directory /var/www/suitecrm/public>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
sudo a2ensite www.suitecrm2.com.conf
sudo a2enmod rewrite dir mime env headers
sudo a2enmod ssl rewrite
sudo systemctl restart apache2
#2: setup firewall rules#############################################
sudo ufw allow OpenSSH
sudo ufw allow 'Apache Full'
sudo ufw enable
#3:setup mariadb#############################################
sudo apt install mariadb-server
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo systemctl status mariadb
mariadb --version
#Configuring MariaDB for SuiteCRM.################################
sudo mysql_secure_installation
sudo mysql -u root -p
MariaDB [(none)]> CREATE DATABASE suitecrm_db;
MariaDB [(none)]> CREATE USER 'suitecrm_user'@'localhost' IDENTIFIED BY 'your-strong-password';
MariaDB [(none)]> GRANT ALL ON suitecrm_db.* TO 'suitecrm_user'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
#4: setup php##################################################
sudo apt install php8.1 php8.1-common libapache2-mod-php8.1 php8.1-cli php8.1-fpm php8.1-xml php8.1-curl php8.1-intl php8.1-gd php8.1-mbstring php8.1-mysqli php8.1-soap php8.1-zip php8.1-imap
php --version
# check installed modules
php -r "print_r(get_loaded_extensions());"
#5: setup suiteCRM##################################################
sudo mkdir -p /var/www/suitecrm.com/
sudo unzip ./Downloads/SuiteCRM-8.5.1.zip -d /var/www/suitecrm
cd /var/www/suitecrm
#from suiteCRM site install for 8.x....................
sudo find . -type d -not -perm 2755 -exec chmod 2755 {} \;
sudo find . -type f -not -perm 0644 -exec chmod 0644 {} \;
sudo find . ! -user www-data -exec chown www-data:www-data {} \;
sudo chmod +x bin/console
#validate php page in crm public folder is working
sudo nano /var/www/suitecrm/public/myinfo.php
# insert <?php phpinfo(); ?> ...and save
#call from OS myinfo page to confirm i have access and php is working (note I've added suitecrm2 to my local host file)
http://suitecrm2.com/myinfo.php
...works
#now call suitecrm - this should initiate app setup:
http://suitecrm2.com
...blank screen
#look at apache2 logs...
... 404 error
[24/Apr/2024:14:43:11 +0000] "GET / HTTP/1.1" 404 492 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
[24/Apr/2024:14:43:12 +0000] "GET /favicon.ico HTTP/1.1" 404 491 "http://suitecrm2.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"
答案1
这最终是我自找的——我使用了 javascript 阻止浏览器插件。