GNU/Linux >> LINUX-Kenntnisse >  >> Debian

So installieren Sie Ionic Framework unter Debian 10

Ionic ist ein kostenloses Open-Source-Framework zum Erstellen hochwertiger, plattformübergreifender nativer und Web-Apps. Es verfügt über eine leistungsstarke Befehlszeilenschnittstelle, mit der Sie ein Projekt mit einem einfachen Befehl erstellen können. Ionic unterstützt Android, IOS und die universelle Windows-Plattform für die Entwicklung von Apps. Ionic verwendet Cardova-Plugins für den Zugriff auf Kamera, GPS und Taschenlampe.

In diesem Beitrag zeigen wir Ihnen, wie Sie Ionic Mobile App Framework auf einem Debian 10-Server installieren.

Voraussetzungen

  • Ein Server mit Debian 10.
  • Auf dem Server ist ein Root-Passwort konfiguriert.

Erste Schritte

Aktualisieren Sie zuerst die Systempakete auf die aktualisierte Version, indem Sie den folgenden Befehl ausführen:

apt-get update -y

Sobald alle Pakete aktualisiert sind, können Sie andere erforderliche Pakete mit dem folgenden Befehl installieren.

apt-get install curl gnupg2 wget -y

Installieren Sie Node.js

Als nächstes müssen Sie Node.js auf Ihrem System installieren. Standardmäßig ist die neueste Version von Node.js nicht im Debian-Repository enthalten. Sie müssen also das Node-Quell-Repository zu Ihrem System hinzufügen.

Sie können das Node-Quell-Repository mit dem folgenden Befehl hinzufügen:

curl -sL https://deb.nodesource.com/setup_14.x | bash -

Nachdem das Repository hinzugefügt wurde, installieren Sie Node.js mit dem folgenden Befehl:

apt-get install nodejs -y

Überprüfen Sie nach der Installation von Node.js die Node.js-Version mit dem folgenden Befehl:

node --version

Sie sollten die folgende Ausgabe sehen:

v14.17.1

Als nächstes müssen Sie auch Cordova auf Ihrem System installieren. Sie können es mit dem folgenden Befehl installieren:

npm install -g cordova

Nach der Installation können Sie mit dem nächsten Schritt fortfahren.

Installieren Sie Ionic Framework

Zuerst müssen Sie ein ionisches CLI-Dienstprogramm auf Ihrem Server installieren. Sie können es mit dem folgenden Befehl installieren:

npm i -g @ionic/cli

Überprüfen Sie nach der Installation von ionic die ionic-Version mit dem folgenden Befehl:

ionic -v

Sie sollten die folgende Ausgabe erhalten:

6.16.3

Erstelle ein Projekt mit Ionic

Jetzt können Sie Ihr erstes Projekt mit dem folgenden Befehl erstellen:

ionic start

Sie werden aufgefordert, das Framework zwischen React oder Angular auszuwählen, Ihren Projektnamen anzugeben und eine Vorlage wie unten gezeigt auszuwählen:

Pick a framework! ????

Please select the JavaScript framework to use for your new app. To bypass this prompt next time, supply a value for the
--type option.

? Framework: Angular

Every great app needs a name! ????

Please enter the full name of your app. You can change this at any time. To bypass this prompt next time, supply name,
the first argument to ionic start.

? Project name: myapp

Let's pick the perfect starter template! ????

Starter templates are ready-to-go Ionic apps that come packed with everything you need to build your app. To bypass this
prompt next time, supply template, the second argument to ionic start.

? Starter template: tabs
? Preparing directory ./myapp in 3.69ms
? Downloading and extracting tabs starter in 591.18ms
? Integrate your new app with Capacitor to target native iOS and Android? No

Your Ionic app is ready! Follow these next steps:

- Go to your new project: cd ./myapp
- Run ionic serve within the app directory to see your app in the browser
- Run ionic capacitor add to add a native iOS or Android project using Capacitor
- Generate your app icon and splash screens using cordova-res --skip-config --copy
- Explore the Ionic docs for components, tutorials, and more: https://ion.link/docs
- Building an enterprise app? Ionic has Enterprise Support and Features: https://ion.link/enterprise-edition

Starten Sie die Anwendung

Wechseln Sie nun in das Verzeichnis Ihres Projekts und starten Sie die Anwendung mit folgendem Befehl:

cd myapp
ionic serve --host 0.0.0.0 --port 8100,/p>

Sie sollten die folgende Ausgabe erhalten:

> ng run app:serve --host=0.0.0.0 --port=8100
[INFO] Development server running!
       
       Local: http://localhost:8100
       External: http://216.98.11.73:8100
       
       Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

Öffnen Sie nun Ihren Webbrowser und greifen Sie über die URL http://your-server-ip:8100 auf Ihre Anwendung zu . Sie sollten Ihre ionische Anwendung auf dem folgenden Bildschirm sehen:

Schlussfolgerung

Herzliche Glückwünsche! Sie haben das Ionic-Framework erfolgreich auf dem Debian 10-Server installiert. Sie können jetzt mit der Erstellung Ihrer mobilen Anwendung mit dem Ionic-Framework beginnen.


Debian
  1. So installieren Sie osquery unter Debian 10

  2. So installieren Sie das Django-Framework unter Debian 11

  3. So installieren Sie PHP 8 auf Debian 11

  4. So installieren Sie GitLab unter Debian 11

  5. So installieren Sie WildFly unter Debian 11

So installieren Sie Ionic Framework unter CentOS 8

So installieren Sie das Play-Framework unter Debian 11

Wie installiere ich Ionic Framework auf Ubuntu 20.04?

So installieren Sie LEMP in Debian 7

So installieren Sie das CodeIgniter-PHP-Framework unter Debian 10

So installieren Sie Flectra unter Debian 10