How to install Feng Office on Debian 10

How to install Feng Office on Debian 10

Feng Office is a free open source online project management and collaboration tool written in PHP. It is a web-based tool that integrates project management, customer relationship management, finance, and billing to help your organization run better. Feng Office provides a rich feature set, including task management, time tracking, Gantt chart, knowledge management, calendar, timetable, automatic alerts and reminders and much more. Feng’s office is available in community, professional and corporate versions.

In this tutorial, we will explain how to install Feng Office Community Edition on a Debian 10 VPS.

prerequisites

  • A server running Debian 10 with at least 2 GB of RAM.
  • A valid domain name pointing to the server IP. In this tutorial, we will use the example.com domain.
  • A root password is configured on your server.

getting Started

Before you begin, update your system with the latest version. You can do this by running:

apt-get update -y apt-get upgrade -y

After the system is updated, restart to apply the changes.

Install Apache and MariaDB

First, you need to install Apache web server and MariaDB server on the server. You can install them by running:

apt-get install apache2 mariadb-server -y

Once these two packages are installed, start the Apache and MariaDB services and use the following commands to start them after the system restarts:

systemctl start apache2 systemctl start mariadb systemctl enable apache2 systemctl enable mariadb

When you are done, you can proceed to the next step.

Install and configure PHP

Debian 10 comes with PHP 7.3 by default. You will need to install PHP version 7.1 to run Feng Office properly.

First, install the required packages using the following command:

apt-get install software-properties-common ca-certificates apt-transport-https -y

Next, add the SURY repository using the following command:

wget https://packages.sury.org/php/apt.gpg apt-key add apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php7.list

Next, update the repository with the following command and install PHP with all required modules:

apt-get install php7.1 php7.1-mysql php7.1-curl php7.1-json php7.1-cgi libapache2-mod-php7.1 php7.1-mcrypt php7.1-xmlrpc php7.1-gd php7.1-mbstring php7.1-common php7.1-soap php7.1-xml php7.1-intl php7.1-cli php7.1-ldap unzip php7.1-zip wget php7.1-readline php7.1-imap php7.1-tidy php7.1-recode php7.1-sq -y

After installing all packages, open the php.ini file and make some settings:

nano /etc/php/7.1/cli/php.ini

Change the following lines:

max_execution_time = 300
max_input_time = 300
memory_limit = 512M
post_max_size = 128M
upload_max_filesize = 128M
html_errors = Off
display_startup_errors = Off
log_errors = On
output_buffering = Off

Save and close the file.

Next, open another php.ini file:

nano /etc/php/7.1/apache2/php.ini

Change the following lines:

max_execution_time = 300
max_input_time = 300
memory_limit = 512M
post_max_size = 128M
upload_max_filesize = 128M
html_errors = Off
display_startup_errors = Off
log_errors = On
output_buffering = Off

Save and close the file. Then, use the following command to install additional packages required by Feng Office:

apt-get install catdoc xpdf ghostscript imagemagick wkhtmltopdf -y

Once all packages are installed, you can proceed to the next step.

Configure MariaDB for Feng Office

Next, you will need to create a database and users for Feng Office.

First, log in to the MariaDB shell using the following command:

mysql -u root -p

Provide your root password when prompted, then use the following command to create a database and user for Feng Office:

MariaDB [(none)]> CREATE DATABASE fengdb; MariaDB [(none)]> GRANT ALL PRIVILEGES ON fengdb.* TO 'fenguser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

Next, refresh the privileges and exit from the MariaDB shell using the following command:

MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;

When you are done, you can proceed to the next step.

Download 冯 办公

First, download the latest version of Feng Office using the following command:

wget -O fengoffice.zip --no-check-certificate https://www.fengoffice.com/web/reference.php?dest=latest_version

After downloading, use the following command to unzip the downloaded file:

unzip fengoffice.zip

Next, move the extracted directory to the Apache web root using the following command:

mv fengoffice-3.7.0.5 /var/www/html/fengoffice

Next, give the fengoffice directory appropriate permissions:

chown -R www-data:www-data /var/www/html/fengoffice chmod -R 777 /var/www/html/fengoffice

When you are done, you can proceed to the next step.

Configure Apache for Feng Office

Next, you will need to create an Apache virtual host profile to serve Feng Office applications. You can use the following commands:

nano /etc/apache2/sites-available/feng.conf

Add the following lines:


     ServerAdmin [email protected]
     DocumentRoot /var/www/html/fengoffice
     ServerName example.com

     
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined


Save and close the file when you are finished. Then, enable the Apache virtual host, headers, and rewrite modules using the following commands:

a2ensite feng.conf a2enmod rewrite a2enmod headers

Next, restart the Apache Web service to apply the changes:

systemctl restart apache2

You can check the status of the Apache web server with the following command:

systemctl status apache2

You should get the following output:

? apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-12-02 07:02:28 EST; 1min 3s ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 2329 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 2333 (apache2)
    Tasks: 7 (limit: 1138)
   Memory: 21.8M
   CGroup: /system.slice/apache2.service
           ??2333 /usr/sbin/apache2 -k start
           ??2334 /usr/sbin/apache2 -k start
           ??2335 /usr/sbin/apache2 -k start
           ??2336 /usr/sbin/apache2 -k start
           ??2337 /usr/sbin/apache2 -k start
           ??2338 /usr/sbin/apache2 -k start
           ??2341 /usr/sbin/apache2 -k start

Dec 02 07:02:28 debian systemd[1]: Starting The Apache HTTP Server...
Dec 02 07:02:28 debian apachectl[2329]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.
Dec 02 07:02:28 debian systemd[1]: Started The Apache HTTP Server.

Access Feng Office web interface

Now open your web browser and browse the URL http://example.com. You will be redirected to the following page:

Click next Button. You should see the following page:

Environmental inspection

Ensure that all prerequisites are installed correctly. then click next Button. You should see the following page:

Database Connectivity

Now, provide your database name, database username, password, select Core_dimensions and Workspaces modules and click next Button. You should see the following page:

The installation is complete

Now click Finish Button to complete the installation. You should see the following page:

Sign in to Feng

Provide your administrator username, email address and password and click submit Button. You will be redirected to the Feng Office login page:

Login form

Now provide your administrator username, password, and click log in Button. You should see the Feng Office dashboard on the following pages:

Feng Office Dashboard

Let’s Encrypt Free SSL to Protect Feng Office

Feng Office is now installed and configured. Next, it is recommended to use “Let’s Encrypt Free SSL” to secure it. To do this, you will need to install the Certbot client on the server. Certbot is a Let’s Encrypt client that can be used to download and install SSL certificates for your domain.

First, add the Certbot repository to the server using the following command:

add-apt-repository ppa:certbot/certbot

After adding the repository, update the repository and install Certbot using the following command:

apt-get update -y apt-get install certbot python-certbot-apache -y

Certbot is now installed and ready to use.

Run the following command to obtain and install the SSL certificate for your domain:

certbot --apache -d example.com

You will be asked to provide your email address and agree to the terms of service.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

Next, you will need to choose whether to redirect HTTP traffic to HTTPS and remove HTTP access as follows:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Select option 2 Download and install a free SSL certificate for your domain and click Enter finish installation.

Now you can securely access your Feng office using the following URL https://example.com.

in conclusion

Congratulations! You have successfully installed, configured and secured Feng Office on your Debian 10 server. You can now easily manage your projects using the Feng Office web interface.

Source

Sidebar