设为首页 收藏本站
查看: 1100|回复: 0

[经验分享] How to Install Anchor CMS on Ubuntu 18.04 LTS-Arnold

[复制链接]

尚未签到

发表于 2019-2-19 06:07:28 | 显示全部楼层 |阅读模式
  Anchor CMS is a free, open source, simple, lightweight and powerful content management system. It is specially designed with performance with a focus on simplicity and elegance. Anchor comes with lots of features like, easy installation, the ability to add custom CSS, JavaScript, and HTML and drag and drop functionality.
  This guide will explain how to install Anchor CMS on an Ubuntu 18.04 LTS (Bionic Beaver) server.
Requirements

  •   A server running Ubuntu 18.04.
  •   A non-root user with sudo privileges.
Install LAMP Server
  Anchor CMS runs on the Web server, written in PHP and use MariaDB to store their data. So you will need to install Apache, MariaDB and PHP to your system.
  First, install Apache and MariaDB with the following command:
  sudo apt-get install apache2 mariadb-server -y
  Next, you will need to add ondrej repository to install the latest version of PHP. You can add the repository with the following command:
  sudo apt-get install software-properties-common
  sudo add-apt-repository ppa:ondrej/php -y
  Once the repository is installed, update the repository and install PHP along with all the dependencies with the following command:
  sudo apt-get update -y
  sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mysql php7.2-mcrypt php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-curl php7.2-zip -y
  Once all the packages are installed, edit the PHP default configuration file:
  sudo nano /etc/php/7.2/apache2/php.ini
  Make the following changes:
memory_limit = 256M  
upload_max_filesize = 150M
  
max_execution_time = 360
  
date.timezone = Asia/Kolkata
  Save and close the file, then start Apache and MariaDB service and enable them to start on boot with the following command:
  sudo systemctl start apache2
  sudo systemctl enable apache2
  sudo systemctl start mysql
  sudo systemctl enable mysql
Configure MariaDB
  Before starting, you will need to secure MariaDB default installation. You can do this by running the following script:
  sudo mysql_secure_installation
  Answer all the questions as shown below:
    Enter current password for root (enter for none):  
    Set root password? [Y/n]: N
  
    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
  Once the MariaDB is secured, log in to MariaDB shell:
  mysql -u root -p
  Enter your root password and press Enter, then create a database and user with the following command:
  MariaDB [(none)]> CREATE DATABASE anchor_db;
  MariaDB [(none)]> CREATE USER anchor_user;
  Next, grant privileges to the Anchor database with the following command:

  MariaDB [(none)]> GRANT ALL PRIVILEGES ON anchor_db.* TO 'anchor_user'@'localhost'>
  Next, you will need to run the FLUSH PRIVILEGES command so that the privileges table will be>  MariaDB [(none)]> FLUSH PRIVILEGES;
  Next, exit from the MariaDB console with the following command:
  MariaDB [(none)]> \q
Install Anchor CMS
  Before starting, you will need to install Composer on your system. The Composer is a dependency manager for PHP. You can install it with the following command:
  curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
  Next, download Anchor CMS using the following command:
  cd /var/www/html
  sudo composer create-project anchorcms/anchor-cms
  sudo mv anchor-cms anchor
  Next, give proper permissions to the anchor directory:
  sudo chown -R www-data:www-data /var/www/html/anchor/
  sudo chmod -R 755 /var/www/html/anchor/
Configure Apache for Anchor
  First, you will need to create an apache virtual host file for Anchor CMS. You can create it with the following command:
  sudo nano /etc/apache2/sites-available/anchor.conf
  Add the following lines:
  
     ServerAdmin admin@example.com
  
     DocumentRoot /var/www/html/anchor
  
     ServerName example.com
  

  
     
  
          Options FollowSymlinks
  
          AllowOverride All
  
          Require all granted
  
     
  

  
     ErrorLog ${APACHE_LOG_DIR}/anchor_error.log
  
     CustomLog ${APACHE_LOG_DIR}/anchor_access.log combined
  

  

  Save the file, then enable apache virtual host file with the following command:
  sudo a2ensite anchor

  Next, enable Apache rewrite module and>  sudo a2enmod rewrite
  sudo systemctl restart apache2
Access Anchor Web Interface
  Now, open your web browser and type the URL http://example.com. You will be redirected to the following page:
DSC0000.png

  Now, click on the Run the installer button. You should see the following page:
DSC0001.png

  Here, choose Language and Time zone, then click on the Next Step button. You should see the following page:
DSC0002.png

  Provide your database details, then click on the Next Step button. You should see the following page:
DSC0003.png

  Provide your site name and description, then click on the Next Step button. You should see the following page:
DSC0004.png

  Provide your admin username, password and email, then click on the Complete button. You should see the following page:
DSC0005.png

  Now, click on the visit your admin panel button. You should see the following page:
DSC0006.png

  Now, provide your admin username and password, then click on the Login button. You should see the following page:
DSC0007.png

Links

  •   Ubuntu
  •   Anchor CMS



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-674029-1-1.html 上篇帖子: How to Install Netdata Monitoring Tool on Ubuntu-Arnold 下篇帖子: React
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表