Skip to main content
OpenEduCat logo
دليل التثبيت

How to Install OpenEduCat on CentOS

Step-by-step guide to install OpenEduCat Free Edition on CentOS 7/8 or Rocky Linux with PostgreSQL, Python dependencies, and Nginx reverse proxy.

This guide covers installing OpenEduCat on CentOS 7, CentOS 8, or Rocky Linux 8, which are common choices for enterprise and government-sector deployments due to their stability and long support cycles. CentOS and Rocky Linux require additional configuration steps compared to Ubuntu, including EPEL repository setup, firewall rules, and SELinux policies. This guide addresses all of these platform-specific requirements. The complete installation takes approximately 45-60 minutes and produces a production-ready deployment behind an Nginx reverse proxy with automatic service management via systemd.

المتطلبات الأساسية

  • CentOS 7/8 or Rocky Linux 8
  • Minimum 4GB RAM (8GB recommended)
  • 20GB free disk space
  • Root or sudo access
  • Internet connection

خطوات التثبيت

الخطوة 1: Update System Packages

$ sudo yum update -y

ملاحظة: Or use dnf on CentOS 8/Rocky Linux.

الخطوة 2: Install EPEL Repository

$ sudo yum install epel-release -y

الخطوة 3: Install PostgreSQL

$ sudo yum install postgresql-server postgresql-contrib -y
$ sudo postgresql-setup initdb
$ sudo systemctl start postgresql
$ sudo systemctl enable postgresql

الخطوة 4: Create Database User

$ sudo -u postgres createuser -s openeducat
$ sudo -u postgres psql -c "ALTER USER openeducat WITH PASSWORD 'your_password';"

ملاحظة: Replace your_password with a secure password.

الخطوة 5: Install Python Dependencies

$ sudo yum install python3 python3-pip python3-devel -y
$ sudo yum install libxml2-devel libxslt-devel openldap-devel -y

الخطوة 6: Install wkhtmltopdf

$ sudo yum install wkhtmltopdf -y

ملاحظة: Required for PDF report generation.

الخطوة 7: Download OpenEduCat

$ cd /opt
$ sudo git clone https://github.com/openeducat/openeducat_erp.git openeducat

الخطوة 8: Install Python Packages

$ cd /opt/openeducat
$ pip3 install -r requirements.txt

الخطوة 9: Configure Firewall

$ sudo firewall-cmd --permanent --add-port=8069/tcp
$ sudo firewall-cmd --reload

الخطوة 10: Configure SELinux for OpenEduCat

$ sudo setsebool -P httpd_can_network_connect on
$ sudo semanage port -a -t http_port_t -p tcp 8069

ملاحظة: If SELinux is enforcing, these commands allow Nginx to proxy to the OpenEduCat application port. Skip this step if SELinux is disabled or set to permissive mode.

الخطوة 11: Create a Systemd Service

$ sudo nano /etc/systemd/system/openeducat.service

ملاحظة: Add a systemd unit file so OpenEduCat starts automatically on boot and can be managed with systemctl start, stop, and restart commands. Set the User to the openeducat system account, the WorkingDirectory to /opt/openeducat, and the ExecStart to python3 openeducat-bin with your configuration file.

الخطوة 12: Enable and Start the Service

$ sudo systemctl daemon-reload
$ sudo systemctl enable openeducat
$ sudo systemctl start openeducat

ملاحظة: The enable command ensures OpenEduCat starts automatically after a server reboot. Check status with sudo systemctl status openeducat.

الخطوة 13: Install and Configure Nginx as Reverse Proxy

$ sudo yum install nginx -y
$ sudo systemctl enable nginx
$ sudo systemctl start nginx

ملاحظة: Configure an Nginx server block to proxy requests from port 80 or 443 to localhost:8069. This provides HTTPS termination, static file caching, and connection handling. Use proxy_pass http://127.0.0.1:8069 in your location block and set appropriate proxy headers for X-Forwarded-For and X-Forwarded-Proto.

الخطوة 14: Verify the Installation

$ curl -I http://localhost:8069
$ sudo systemctl status openeducat
$ sudo systemctl status nginx

ملاحظة: Confirm that OpenEduCat responds on port 8069 and that both the application and Nginx services are running. Open your browser and navigate to http://your-server-ip to access the OpenEduCat web interface through the Nginx reverse proxy. The default administrator credentials are admin/admin. Change the password immediately after your first login.

هل أنت مستعد لتحويل المؤسسة؟

اكتشف كيف يوفّر OpenEduCat الوقت ليحصل كل طالب على الاهتمام الذي يستحقه.

جرّبه مجانًا لمدة 15 يومًا. لا حاجة لبطاقة ائتمان.