GNU/Linux >> Linux Esercitazione >  >> Debian

Come installare Ionic Framework su Debian 10

Ionic è un framework gratuito e open source per la creazione di app Web e native multipiattaforma di alta qualità. Viene fornito con una potente interfaccia a riga di comando che ti aiuta a creare un progetto da un semplice comando. Ionic supporta Android, IOS e la piattaforma Windows universale per lo sviluppo di app. Ionic utilizza i plug-in Cardova per accedere a fotocamera, GPS e torcia.

In questo post, ti mostreremo come installare Ionic Mobile App Framework sul server Debian 10.

Prerequisiti

  • Un server che esegue Debian 10.
  • Sul server è configurata una password di root.

Per iniziare

Innanzitutto, aggiorna i pacchetti di sistema alla versione aggiornata eseguendo il comando seguente:

apt-get update -y

Una volta aggiornati tutti i pacchetti, puoi installare altri pacchetti richiesti con il seguente comando.

apt-get install curl gnupg2 wget -y

Installa Node.js

Successivamente, dovrai installare Node.js sul tuo sistema. Per impostazione predefinita, l'ultima versione di Node.js non è inclusa nel repository Debian. Quindi dovrai aggiungere il repository di origine Node al tuo sistema.

Puoi aggiungere il repository di origine del nodo con il seguente comando:

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

Una volta aggiunto il repository, installa Node.js con il seguente comando:

apt-get install nodejs -y

Dopo aver installato Node.js, verifica la versione di Node.js con il seguente comando:

node --version

Dovresti vedere il seguente output:

v14.17.1

Successivamente, devi anche installare Cordova sul tuo sistema. Puoi installarlo con il seguente comando:

npm install -g cordova

Una volta installato, puoi procedere al passaggio successivo.

Installa Ionic Framework

Innanzitutto, dovrai installare un'utilità CLI ionica sul tuo server. Puoi installarlo con il seguente comando:

npm i -g @ionic/cli

Dopo aver installato ionic, verifica la versione ionic con il seguente comando:

ionic -v

Dovresti ottenere il seguente output:

6.16.3

Crea un progetto con Ionic

Ora puoi creare il tuo primo progetto con il seguente comando:

ionic start

Ti verrà chiesto di selezionare il framework tra React o Angular, specificare il nome del tuo progetto e selezionare un modello come mostrato di seguito:

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

Avvia l'applicazione

Ora cambia la directory nel tuo progetto e avvia l'applicazione con il seguente comando:

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

Dovresti ottenere il seguente output:

> 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!

Ora apri il tuo browser web e accedi alla tua applicazione utilizzando l'URL http://your-server-ip:8100 . Dovresti vedere la tua applicazione ionica nella schermata seguente:

Conclusione

Congratulazioni! hai installato con successo il framework Ionic sul server Debian 10. Ora puoi iniziare a creare la tua applicazione mobile utilizzando il framework Ionic.


Debian
  1. Come installare osquery su Debian 10

  2. Come installare Django Framework su Debian 11

  3. Come installare PHP 8 su Debian 11

  4. Come installare GitLab su Debian 11

  5. Come installare WildFly su Debian 11

Come installare Ionic Framework su CentOS 8

Come installare il framework Play su Debian 11

Come installare Ionic Framework su Ubuntu 20.04?

Come installare LEMP in Debian 7

Come installare CodeIgniter PHP Framework su Debian 10

Come installare Flectra su Debian 10